package test;

import com.jt.config.SpringConfig;
import com.jt.service.UserService;
import com.jt.service.UserServiceImpl;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class test01 {
    @Test
    public void test(){
        ApplicationContext context=
                new AnnotationConfigApplicationContext(SpringConfig.class);
        UserServiceImpl userService = context.getBean(UserServiceImpl.class);
        userService.sell(3);
    }
}
